# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-drf-spectacular
_pyname=drf-spectacular
pkgver=0.27.0
pkgrel=0
arch="noarch"
pkgdesc="Sane and flexible OpenAPI 3 schema generation for Django REST framework"
url="https://pypi.python.org/project/drf-spectacular"
license="BSD-3-Clause"
depends="
	py3-django-rest-framework
	py3-jsonschema
	py3-uritemplate
	py3-yaml
	py3-inflection
	py3-django-oauth-toolkit
	py3-jwcrypto
	"
makedepends="
	py3-setuptools
	py3-gpep517
	py3-wheel
	"
checkdepends="
	py3-pytest
	py3-pytest-django
	py3-pytest-cov
	py3-flake8
	py3-mypy
	py3-isort
	"
options="!check" # Failing test units
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/d/drf-spectacular/drf-spectacular-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
7c17a36e6b52e5111c2e43775fe6963fa4f10ba8f1b73984cf7f6e413c9ab0e3be609c9d270c500a7d2551bf2ea266aaab2f3c70481d8aecfe33f350ca5e3b79  py3-drf-spectacular-0.27.0.tar.gz
"
